<%--
 * list.jsp
 *
 * Copyright (C) 2013 Universidad de Sevilla
 * 
 * The use of this project is hereby constrained to the conditions of the 
 * TDG Licence, a copy of which you may download from 
 * http://www.tdg-seville.info/License.html
 --%>

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@taglib prefix="acme" tagdir="/WEB-INF/tags"%>

<display:table pagesize="5" class="displaytag" keepStatus="true"
	name="comments" requestURI="${requestURI}" id="row">

	<spring:message code="comment.creationMoment"
		var="creationMomentHeader" />
	<display:column property="creationMoment"
		title="${creationMomentHeader}" sortable="true"
		format="{0,date,dd/MM/yyyy HH:mm}" />

	<spring:message code="comment.text" var="commentTextHeader" />
	<display:column property="text" title="${commentTextHeader}"
		sortable="false" />

	<spring:message code="comment.rating" var="commentRatingHeader" />
	<display:column property="rating" title="${commentRatingHeader}"
		sortable="true" />

	<jstl:if test="${requestURI=='comment/customer/list.do' }">
		<display:column>
			<a
				href="availableItem/customer/edit.do?availableItemId=${row.availableItem.id}"><spring:message
					code="comment.viewItem" /></a>
		</display:column>
	</jstl:if>
</display:table>
<acme:cancel code="comment.goBack" url="${backURI}" />

